Skip to content

Conversation

@vvalecha519
Copy link
Contributor

@vvalecha519 vvalecha519 commented Oct 22, 2025

Note

Introduce a two-step validator flow with pre-registration and role-gated creation, track validator creation status, add invalidation, and update interfaces/tests.

  • Contracts:
    • LiquidityPool (src/LiquidityPool.sol):
      • Add role LIQUIDITY_POOL_VALIDATOR_CREATOR_ROLE and new batchCreateBeaconValidators(...) to send 1 ETH per validator (role-gated) while accounting LP balances.
      • Update staking flow: new step to batchRegister(...) (pre-registration) before creation and funding.
    • StakingManager (src/StakingManager.sol):
      • Track validator state via validatorCreationStatus mapping and emit ValidatorCreationStatusUpdated.
      • Add registerBeaconValidators(...) to pre-register validators (checks bid active, deposit root, node validity) and mark REGISTERED.
      • Gate createBeaconValidators(...) to only REGISTERED entries, then link, deposit 1 ETH, mark CONFIRMED, and update auction info.
      • Add invalidateRegisteredBeaconValidator(...) (role STAKING_MANAGER_VALIDATOR_INVALIDATOR_ROLE) to mark INVALIDATED.
  • Interfaces:
    • IStakingManager: add ValidatorCreationStatus enum, new fns registerBeaconValidators(...), invalidateRegisteredBeaconValidator(...), event ValidatorCreationStatusUpdated, and error InvalidValidatorCreationStatus.
    • ILiquidityPool: declare batchCreateBeaconValidators(...).
  • Tests:
    • Add test/fork-tests/validator-key-gen.t.sol covering pre-registration, creation, invalidation, role gating, pause checks, accounting, and multi-validator flows.

Written by Cursor Bugbot for commit 098cf09. This will update automatically on new commits. Configure here.

cursor[bot]

This comment was marked as outdated.

cursor[bot]

This comment was marked as outdated.

@pankajjagtapp pankajjagtapp self-assigned this Oct 30, 2025
…checks and Comment out deprecated LiquidityPool initialization calls in TestSetup
cursor[bot]

This comment was marked as outdated.

cursor[bot]

This comment was marked as outdated.

Copy link
Contributor

@seongyun-ko seongyun-ko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's create a separate PR for the changes on LiquidityPool. since it is not related with the current feature scope.

cursor[bot]

This comment was marked as outdated.

…ingManager and corresponding tests in ValidatorKeyGenTest
@sherlock-ai-beta
Copy link

Sherlock AI Findings

The automated tool completed its analysis of the codebase and found no potential security issues.

Next Steps: No immediate actions are required. Continue monitoring the codebase with future scans.

Full report available at: https://ai.sherlock.xyz/runs/240d3d89-cc9c-4be4-bfd3-c024d7111dd4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants